{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}

{/* import Js,Css */}
	<js href="__PUBLIC__/js/admin/listTable.js"/>
	<js href="__PUBLIC__/js/admin/js.util.js"/>
	<css href="__PUBLIC__/css/admin/common.css"/>
	<js href="__PUBLIC__/js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/css/jquery-ui.css" />
	<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/js/core/plugins.js"/>
{/* import js,css */}

<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<!-- [position] -->
	<include file="Core:QTip"/>
<!-- [position] -->



<form method="post" action="__URL__/mod_node_ok">
	<table>
		<tr>	
			<td>{$lang.node_name}</td>
			<td><input type="text" class="input" name="name" value="{$nodeInfo.name}"/></td>
		</tr>
		<tr>	
			<td>{$lang.node_title}</td>
			<td><input type="text" class="input" name="title" value="{$nodeInfo.title}"/></td>
		</tr>
		<tr>	
			<td>{$lang.status}</td>
			<td>
				<input type="checkbox" name="status" value="1"/>开启&nbsp;&nbsp;
				<input type="checkbox" name="status" value="0"/>关闭
			</td>
		</tr>
		<tr>	
			<td>{$lang.remark}</td>
			<td><input type="text" class="input" name="remark" value="{$nodeInfo.remark}"/></td>
		</tr>
		<tr>	
			<td>{$lang.parent_id}</td>
			<td>
				<select id="pid" name="pid" value="{$nodeInfo.parent_id}">
					<option value="0">{$lang.top_node_id}</option>
					<volist name="nodeList" id="node">
						<option value="{$node.id}">{$node.name}</option>
					</volist>
				</select>
			</td>
		</tr>			
		<tr>	
			<td>{$lang.sort_order}</td>
			<td><input type="text" class="input" name="sort" value="{$nodeInfo.sort}"/></td>
		</tr>
		<tr>	
			<td>{$lang.level}</td>
			<td>
				<select id="level" name="level" class="select" value="{$nodeInfo.level}">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
				</select>
			</td>
		</tr>		
	</table>
	<input type="hidden" name="id" value="{$nodeInfo.id}"/>
	<input type="submit" value="{$lang.submit_text}"/>
</form>

<script>
	//初始化表单元素
	function initSelect(id,idValue){
		if(typeof id== 'undefined') return ;
		if(typeof idValue== 'undefined') return ;
		//id => obj
		var selectObj   =   document.getElementById(id);
		for(var i = 0; i < selectObj.options.length; i ++){
			if (selectObj.options[i].value == idValue) {        
				selectObj.options[i].selected = true; 
				break;        
			}        
		}		
	}
	
	//初始化
	initSelect('pid',{$nodeInfo.pid});
	initSelect('level',{$nodeInfo.level});

	//初始化radio,checkbox
	function initInput(name,value){
		if(typeof name== 'undefined') return ;
		if(typeof value== 'undefined') return ;
		var inputObj   =   document.getElementsByName(name);
		
		for(var i = 0; inputObj.length; i ++ ){
			//alert(inputObj[i].value + " : " + value);
			if(inputObj[i].value == value){
				inputObj[i].checked = true;
				break;
			}
		}		
	}	
	//初始化input
	initInput('status',{$nodeInfo.status});
	
</script>


